import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:"/",
      redirect:"/home",
    },
    {
      path: '/home',
      component: ()=>import("../pages/home/Index.vue"),
      children:[
        {
          path:"/home",
          redirect:"/home/kaoqin",
        },
        {
          path: '/home/kaoqin',
          component: ()=>import("../pages/home/kaoqin/Index.vue"),
        },
        {
          path: '/home/kecheng',
          component: ()=>import("../pages/home/kecheng/Index.vue"),
        },
        {
          path: '/home/jiaoxue',
          component: ()=>import("../pages/home/jiaoxue/Index.vue"),
        },
        {
          path: '/home/xueyuan',
          component: ()=>import("../pages/home/xueyuan/Index.vue"),
        },
        {
          path: '/home/wenjuan',
          component: ()=>import("../pages/home/wenjuan/Index.vue"),
        },
        {
          path: '/home/fangtan',
          component: ()=>import("../pages/home/fangtan/Index.vue"),
          children:[
            {
              path:"/home/fangtan",
              redirect:"/home/fangtan/jiazhang",
            },
            {
              path: '/home/fangtan/jiazhang',
              component: ()=>import("../pages/home/fangtan/components/jiazhang.vue"),
            },
            {
              path: '/home/fangtan/xuesheng',
              component: ()=>import("../pages/home/fangtan/components/xuesheng.vue"),
            },
          ]
        },
        {
          path: '/home/kucun',
          component: ()=>import("../pages/home/kucun/Index.vue"),
        },
      ]
    },
    {
      path: '/login',
      component:()=>import("../pages/login/Index.vue"),
    },
    {
      path: "/:pathMatch(.*)*",
      component: () => import("../pages/notFound/Index.vue"),
    },
  ]
})

export default router;
